package com.ojoin.trade.common.utils.paynow;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 树强
 * Date: 15-7-25
 * Time: 上午10:20
 * To change this template use File | Settings | File Templates.
 */
public class test {

    public static void main(String[] args){
        Packages packages = new Packages();
        Unpack unpack = new Unpack();
        Map<String,String> map = new HashMap<String, String>();
        try {
            String requestReport = "";

            String funcode = "C0000003";
            map.put("mhtNo","mchId201507230000401");
            map.put("mchType","00");
            map.put("mchName","123");
            map.put("mobile","18645630180");
            map.put("name","陶树强");
            map.put("certNo","231121199008130013");
            map.put("certDate","20150908");
            map.put("licNo","11111");
            map.put("taxNo","22222");
            map.put("openNo","33333");
            map.put("orgNo","44444");
            map.put("cardMobile","18645630180");
            map.put("cardNo","6214830102502696");
            map.put("cardProvince","4900");
            map.put("cardCity","5150");
            map.put("branchNo","105426000170");
            map.put("orderId","45234");



                    requestReport = packages.returnMess(funcode,map);
            requestReport = "requestReport="+requestReport;
            String xml = HttpPost.http("http://localhost:9898/merchant_use/bizHttpsService/service",requestReport) ;
//            String xml = HttpsExample.httpsExample( + requestReport) ;
            List list = unpack.unpack(xml, "utf-8");
            Map data = null;
            if("00".equals(list.get(0))){
                data = (Map)list.get(1);
            }
            System.out.print(data);
        }catch (Exception e){
            e.printStackTrace();
        }
    }

}
